A widely used coding and compression standard for audio and video is the MPEG-2 standard. MPEG-2 is actually the designation for a group of such standards, promulgated by the Moving Picture Experts Group (“MPEG”) as the ISO/IEC 13818 international standard. A typical use of MPEG-2 is to encode audio and video for broadcast signals, including signals transmitted by satellite and cable.
An MPEG-2 transport stream (“MPEG-2 TS”) is data in a format specified in Part 1, Systems, of ISO/IEC 13818-1. The purpose of the format is to allow the multiplexing of digital video and audio data, and the synchronizing of the resulting output. The basic unit of data in an MPEG-2 TS is the packet. Packets are usually 188 bytes long, but can be 204 bytes long.
An MPEG-2 TS may be transmitted in Packet Synchronous mode or Packet Asynchronous mode. In Packet Synchronous mode, the clock rate is same as the MPEG-2 data rate, as shown in FIG. 1, which is a graph showing signal level versus time for four signals found in a Packet Synchronous mode system. The four signals are a data valid (“DVALID”) signal, a packet synchronization (“PSYNC”) signal, a data signal and a clock signal. The respective signals are vertically displaced, but horizontally (time) aligned to show relative timings of the signals. As can be seen, because the clock and data are synchronous, with the beginning of the clock cycle (in this case, the rising edge of the clock) being made to coincide with approximately the middle of a data bit, at the beginning of each clock cycle there is valid MPEG-2 data. For this reason, DVALID is simply maintained high during the entire packet, after the occurrence of a PSYNCH signal that signals the beginning of the packet, as shown in the figure.
In contrast, in Packet Asynchronous mode, the clock rate is fixed at some frequency that is higher than MPEG-2 data rate, as shown in FIG. 2, which is a graph similar to that of FIG. 1, but showing signals found in a Packet Asynchronous mode system. At each clock period, the data may or may not be valid, so each valid bit of data needs to be accompanied by a DVALID signal to inform the system that valid data does, in fact, exist at the beginning of the associated clock cycle. Otherwise, DVALID is not asserted, to inform the system that valid data does not exist at the beginning of a clock cycle.
Some MPEG-2 TS receiving equipment may be limited to receiving only Packet Synchronous data. Therefore, before providing a Packet Asynchronous data stream to such equipment, the data stream needs to be converted into a Packet Synchronous data stream. This procedure is called Packet Synchronization or sometimes Packet Smoothing.
In general, to achieve data synchronization, a first-in-first-out (“FIFO”) buffer memory is typically used, since incoming data and outgoing data may have different clocks. The output clock frequency needs to be matched with the average data rate. This matching is normally achieved by using a dedicated PLL 30 which monitors either data rate or the fill status of a FIFO 32, as shown in FIG. 3. Now, it is known that the locking time of a PLL is dominated by its loop filter bandwidth which is designed to be slow to minimize the noise contribution of the phase detector and maintain the PLL stability. However, as a result, it takes many clock cycles to respond to an input data rate shift. To guarantee that no data is lost when a data rate shift does happen, the FIFO length, i.e., the memory size of the FIFO, needs to be much larger than the packet size.
However, the larger a FIFO that must be provided, the more expensive the circuit incorporating it. Therefore, it would be desirable to have a way of providing for MPEG-2 TS Packet Synchronization with a minimal FIFO size.